using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;

namespace Crossborder.Domian.Products
{
    public class ProductInfos : BaseEntity
    {
        /// <summary>
        /// 产品Id
        /// </summary>
        /// <value></value>
        [Comment("产品Id")]
        public string ProductId { get; set; }

        /// <summary>
        /// 产品编号
        /// </summary>
        /// <value></value>
        [Comment("产品编号")]
        public string ProductNo { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        /// <value></value>
        [Comment("产品名称")]
        public string ProductName { get; set; }

        /// <summary>
        /// 品类Id
        /// </summary>
        /// <value></value>
        [Comment("品类Id")]
        public string? CategoryId { get; set; }

        /// <summary>
        /// 品类名称（用于冗余设计）
        /// </summary>
        /// <value></value>
        [Comment("品类名称（用于冗余设计）")]
        public string? CategoryName { get; set; }

        /// <summary>
        /// 二级品类Id
        /// </summary>
        /// <value></value>
        [Comment("二级品类Id")]
        public string? SubCategoryId { get; set; }

        /// <summary>
        /// 二级品类名称（用于冗余设计）
        /// </summary>
        /// <value></value>
        [Comment("二级品类名称（用于冗余设计）")]
        public string? SubCategoryName { get; set; }

        public void Create()
        {
            this.ProductId = Guid.NewGuid().ToString();
            this.CreateDate = DateTime.Now;
            this.IsEnabled = true;
            this.IsDelete = false;
        }
    }
}